﻿using Com.Aote.ObjectTools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Com.Aote.Controls
{
    public partial class OrganizationOpen : CustomChildWindow
    {
        public OrganizationOpen()
        {
            InitializeComponent();
        }

        private void OK_Click(object sender, RoutedEventArgs e)
        {
            TreeView tv = (TreeView)this.FindName("ui_tree");
            GeneralObject go = (GeneralObject)tv.SelectedItem;
            string fullname = (string)go.GetPropertyValue("fullname");
            fullname = fullname.Replace("统一资源管理(网络).", "");
            string fullid = (string)go.GetPropertyValue("fullid");
            fullid = fullid.Replace("57638.", "");
            this.ParamValue = fullid;
            this.ReturnValue = fullname;
            this.DialogResult = true;
        }
    }
}
